import request from '@/utils/request'

// 查询设备故障码信息列表
export function listEcu(query) {
  return request({
    url: '/device/ecu/list',
    method: 'get',
    params: query
  })
}

// 查询设备故障码信息详细
export function getEcu(id) {
  return request({
    url: '/device/ecu/' + id,
    method: 'get'
  })
}

// 新增设备故障码信息
export function addEcu(data) {
  return request({
    url: '/device/ecu',
    method: 'post',
    data: data
  })
}

// 修改设备故障码信息
export function updateEcu(data) {
  return request({
    url: '/device/ecu',
    method: 'put',
    data: data
  })
}

// 删除设备故障码信息
export function delEcu(id) {
  return request({
    url: '/device/ecu/' + id,
    method: 'delete'
  })
}
